package com.atguigu.spzx.product.service.Impl;

import com.atguigu.spzx.model.entity.product.ProductSku;
import com.atguigu.spzx.product.mapper.ProductSkuMapper;
import com.atguigu.spzx.product.service.ProductSkuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;

/**
 * @author LT
 * @create 2024-04-01-20:37
 */
@Service
public class ProductSkuServiceImpl extends ServiceImpl<ProductSkuMapper,ProductSku> implements ProductSkuService {
   //    @Cacheable(value = "spzx:product",key = "'item:'+#skuId")
    @CacheEvict(value = "spzx:product",key = "'item:'+#skuId")
    @Override
    public void updateSkuStockAndSaleById(ProductSku productSku) {
        this.updateById(productSku);
    }
}
